﻿@using com.hyrentals.webcommon.extensions
@using com.hyrentals.webportal.Config
@using com.hyrentals.data
@using com.hyrentals.webportal.Models
@using com.hyrentals.webportal.helpers


@model IEnumerable<RV>
@{
    Html.AddStyle("css/member");
    MemberNavType navType = MemberNavType.MyRVs;

    string myReservationsUrl = UrlGenerator.MyReservationsUrl();
}

<div class="layout-primary">
    <div class="layout-2-left">
    @Html.Action("Nav", "Member", new { navType = navType})
    </div>
    <div class="layout-2-right">
    <ul class="member-subnav">
        <li>My RVs</li>
        <li class="sep">|</li>
        <li><a href="@myReservationsUrl">Reservations</a></li>
    </ul>
    @{
        if (Model.Count() > 0)
        {
        <ul class="rv-list">
        @{
            foreach (RV rv in Model)
            {
                string detailUrl = UrlGenerator.RVDetailUrl(rv.Id);
                string pricingUrl = UrlGenerator.RVPricingUrl(rv.Id);
            <li>
                <h1><a href="@detailUrl" target="_blank">@rv.DisplayName</a></h1>
                <p><a href="@pricingUrl">Edit</a></p>
            </li>
            }
        }
        </ul>
        }
    }
    </div>
</div>